<?php

namespace app\service;

use Firebase\JWT\JWT;
use Firebase\JWT\Key;
use think\facade\Config;
use think\facade\Env;

class JwtService{
    public static function verifyToken($token) {
        try {
            $decoded = JWT::decode($token, new Key(Env::get('app.jwt_secret'), 'HS256'));
            return (array)$decoded;
        } catch (\Exception $e) {
            return false;
        }
    }
}
